package cn.xiaobai.service;

import cn.xiaobai.domain.User;
import cn.xiaobai.mapper.UserMapper;
import com.mybatisflex.core.service.IService;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author yangdaji
 * @Date 2024/2/17
 * @PackageName cn.xiaobai
 * @ClassName UserService
 */
@Service
public class UserService extends ServiceImpl<UserMapper, User> implements IService<User> {

    @Autowired
    private UserMapper userMapper;

    public void queryUser() {
        List<User> users = userMapper.selectAll();
        users.forEach(System.out::println);
    }
}
